package com.lj.queue.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.lj.mp.standard.entity.SysStandardEntity;
import com.lj.queue.enums.DelayQueueMessageStatus;
import java.time.LocalDateTime;

/**
 * <p>
 * 延迟队列消息表
 * </p>
 *
 * @author lj
 * @since 2025-07-21 16:55:02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("queue_delay_queue_message")
public class DelayQueueMessage extends SysStandardEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 延迟队列id
     */
    private Long queueId;

    /**
     * 消息内容
     */
    private String message;

    /**
     * 消息状态
     */
    private DelayQueueMessageStatus status;

    /**
     * 预计时间
     */
    private LocalDateTime expectTime;

    /**
     * 真实的执行时间
     */
    private LocalDateTime executionTime;

    public DelayQueueMessage() {
    }

    public DelayQueueMessage(String message, LocalDateTime expectTime) {
        this.message = message;
        this.expectTime = expectTime;
    }
}
